Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow space separated multiple items injection #1149

Merged
merged 3 commits into from Mar 31, 2020

Conversation

DL6ER
Copy link
Member

@DL6ER DL6ER commented Feb 11, 2020

By submitting this pull request, I confirm the following:

  • I have read and understood the contributors guide, as well as this entire template.
  • I have made only one major change in my proposed changes.
  • I have commented my proposed changes within the code.
  • I have tested my proposed changes, and have included unit tests where possible.
  • I am willing to help maintain this change if there are issues with it later.
  • I give this submission freely and claim no ownership.
  • It is compatible with the EUPL 1.2 license
  • I have squashed any insignificant commits. (git rebase)

What does this PR aim to accomplish?:

Allow users to add multiple groups/clients/domains/adlists at once by space-separating them. All added items will receive the same comment (if specified).

Example 1
Screenshot from 2020-02-11 20-05-57
resulting in:
Screenshot from 2020-02-11 20-06-03

Example 2
Screenshot from 2020-02-11 20-06-29
resulting in:
Screenshot from 2020-02-11 20-06-41

Also, we remove the redundant list management from the settings page as this code was only partially migrated to the database backend (it was planed to be replace, anyway) and still uses CLI callbacks in the background. It is not needed any longer. I added a link to the new page so users will not be confused by a sudden absence of the settings tab.

How does this PR accomplish the above?:

Implement processing of space-separated items as individual entries.

What documentation changes (if any) are needed to support this PR?:

None

Signed-off-by: DL6ER <dl6er@dl6er.de>
…ing CLI callbacks instead of working directly on the database.

Signed-off-by: DL6ER <dl6er@dl6er.de>
@DL6ER DL6ER added this to the v5.0 milestone Feb 11, 2020
@DL6ER DL6ER requested a review from a team February 11, 2020 19:12
@pralor-bot
Copy link

This pull request has been mentioned on Pi-hole Userspace. There might be relevant details there:

https://discourse.pi-hole.net/t/restore-ability-to-add-blacklists-in-bulk/28091/20

@pralor-bot
Copy link

This pull request has been mentioned on Pi-hole Userspace. There might be relevant details there:

https://discourse.pi-hole.net/t/batch-adlist-whitelist-updates/28556/9

@PromoFaux
Copy link
Member

Approved pending conflict resolution

@DL6ER DL6ER merged commit f9fd89c into release/v5.0 Mar 31, 2020
@DL6ER DL6ER deleted the new/space-separated-item-injection branch March 31, 2020 21:40
@pralor-bot
Copy link

This pull request has been mentioned on Pi-hole Userspace. There might be relevant details there:

https://discourse.pi-hole.net/t/restore-ability-to-add-blacklists-in-bulk/28091/37

@pralor-bot
Copy link

This pull request has been mentioned on Pi-hole Userspace. There might be relevant details there:

https://discourse.pi-hole.net/t/managing-ad-lists-in-5-0/30088/8

@stevewithey
Copy link

Comma separated is a more natural delimiter for this kind of behaviour surely? This change breaks the ability to have group names with spaces in them..

@pralor-bot
Copy link

This pull request has been mentioned on Pi-hole Userspace. There might be relevant details there:

https://discourse.pi-hole.net/t/bug-creating-group-name-with-spaces-adds-more-than-one-group/32611/2

@pralor-bot
Copy link

This pull request has been mentioned on Pi-hole Userspace. There might be relevant details there:

https://discourse.pi-hole.net/t/bulk-blacklist-whitelist/13556/4

@pralor-bot
Copy link

This pull request has been mentioned on Pi-hole Userspace. There might be relevant details there:

https://discourse.pi-hole.net/t/adding-a-list-of-domains-to-white-blacklist-through-webgui/5686/10

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants